package com.biz.primus.ms.cart.dao.ro;


import com.biz.primus.base.redis.annotation.FieldSortedSet;
import com.biz.primus.base.redis.annotation.Ro;
import com.biz.primus.base.redis.bean.BaseRedisObject;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * ShopCartItemRo
 *
 * @author JKLiues
 * @date 2017/11/8
 */
@Ro(key = "cart")
@Getter
@Setter
@ToString
public class ShopCartItemRo extends BaseRedisObject<String> {

    private static final long serialVersionUID = -4172925039918467468L;

    /**
     * 商品Id
     */
    private Long productId;

    /**
     * 商品编码
     */
    private String productCode;

    /**
     * 是否选中
     */
    private boolean selected;

    /**
     * 用户Id
     */
    @FieldSortedSet(key = "memberId", score = "updateTimestamp")
    private Long userId;

    /**
     * 数量
     */
    private Integer quantity = 0;
}
